﻿// <copyright file="ListViewSortItem.cs" company="Soumya Chattopadhyay">
// Copyright (c) 2010 All Right Reserved
// </copyright>
// <disclaimer> This software is intented for educational purposes only and not for 
// commerical or prodution use. The software is provided "as is", without warranty 
// of any kind, express or implied, including but not limited to the warranties of 
// merchantability, fitness for a particular purpose and noninfringement. In no event 
// shall the author(s) or copyright holder(s) be liable for any claim, damages or other 
// liability, whether in an action of contract, tort or otherwise, arising from, out of 
// or in connection with the software or the use or other dealings in the software.
// </disclaimer>

namespace My.CodePlex.TFSExplorer
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Linq;
    using System.Text;
    using System.Windows.Controls;

    /// <summary>
    /// The listview sort item class
    /// </summary>
    public class ListViewSortItem
    {
        #region Constructor

        /// <summary>
        /// Initializes a new instance of the <see cref="ListViewSortItem"/> class.
        /// </summary>
        /// <param name="comparer">The comparer.</param>
        /// <param name="lastColumnHeaderClicked">The last column header clicked.</param>
        /// <param name="lastSortDirection">The last sort direction.</param>
        public ListViewSortItem(IListViewCustomComparer comparer, GridViewColumnHeader lastColumnHeaderClicked, ListSortDirection lastSortDirection)
        {
            this.Comparer = comparer;
            this.LastColumnHeaderClicked = lastColumnHeaderClicked;
            this.LastSortDirection = lastSortDirection;
        }

        #endregion

        #region Properties

        /// <summary>
        /// Gets the comparer.
        /// </summary>
        /// <value>The comparer.</value>
        public IListViewCustomComparer Comparer { get; private set; }

        /// <summary>
        /// Gets or sets the last column header clicked.
        /// </summary>
        /// <value>The last column header clicked.</value>
        public GridViewColumnHeader LastColumnHeaderClicked { get; set; }

        /// <summary>
        /// Gets or sets the last sort direction.
        /// </summary>
        /// <value>The last sort direction.</value>
        public ListSortDirection LastSortDirection { get; set; }

        #endregion
    }
}
